Skip to content

Instantly share code, notes, and snippets.

@t4sh
t4sh / .Add Hammerspoon Config.md
Last active November 27, 2026 03:56
Hammerspoon config — install guide + init.lua (Rectangle-style window management + top-edge Almost Maximize)

Hammerspoon window shortcuts on macOS

  1. Install Hammerspoon with brew install --cask hammerspoon, or download the app from hammerspoon.org. Open it.
  2. Choose Open Config from the Hammerspoon menu. Paste the included init.lua into that file (~/.hammerspoon/init.lua). If you already have bindings, keep a copy of your config and merge the bindings you want.
  3. Allow Hammerspoon under System Settings → Privacy & Security → Accessibility. Enable Launch Hammerspoon at login in its preferences if you want the shortcuts after restart.
  4. Choose Reload Config. Focus a normal app window and press Control–Option–Return to try Almost Maximize.
Shortcut Window action
Control–Option–Return / Control–Option–Shift–Return Almost maximize / maximize
@bashenk
bashenk / AndroidDeviceEnrollmentQRCreation.md
Last active November 27, 2026 03:49
Creating a QR Code for Android Device Enrollment

From: pngwn/MDsveX#293

In #259 I alluded to other changes in v1, besides the configuration API. The biggest one is something that has been one of my biggest frustration in some regards: markdown itself. Now, lets get this out of the way: markdown is excellent and easily the best document markup format we have ever had. Kudos to Mr Gruber and all who have pushed markdown forward. Nothing in this document should be considered a derogation of markdown, I have nothing but respect and admiration for everything that has brought us to this point. This is a criticism, in many ways, but hopefully a constructive one. It is also just the opinion of a single penguin, and a penguin of questionable character, at that.


Penguin-flavoured markdown

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@royallight1999-jpg
royallight1999-jpg / README.md
Last active November 27, 2026 03:24
Erdős problem #340: evidence on A−A of the Mian–Chowla sequence

Erdős problem #340: evidence on the difference set A−A of the greedy Sidon (Mian–Chowla) sequence

Finite-prefix evidence on the A−A question, and a related Lean formalization (not a proof).

Data. I used Reichert's 100,000 terms of A005282 (OEIS) and independently recomputed the first 8768 terms (exact match). The missing positive differences up to 302 agree with the 50 terms of A080200 (Reichert had already checked these against 100,000 terms). Indexing: a_1 = 1.

  1. Coverage. For the prefix A_N = {a_1,...,a_N}, N = 10^5, let c_N(k) = |(A_N − A_N) ∩ [2^k, 2^(k+1))| / 2^k (positive differences). c_N(6)=0.89, c_N(10)=0.54, c_N(15)=0.24, c_N(20)=0.094, c_N(25)=0.034, c_N(30)=0.0116. These are lower bounds for the full sequence; a heuristic tail estimate suggests later terms add about 5% at k = 30 and less for smaller k. For 20 ≤ k ≤ 30 the coverage drops by a factor of about 0.81 per doubling, i.e. c ≈ d^(−0.30).
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@NewTasana
NewTasana / gist:35764b95b3061c17d186141a035cf5e5
Created November 20, 2026 19:53
vine_etv_analyzer.html
<!DOCTYPE html>
<html lang="en" class="antialiased">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Amazon Vine ETV Cap &amp; Rolling Window Analyzer</title>
<!-- Google Fonts: Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
@msin32
msin32 / firefox-kiosk.sh
Created November 27, 2026 03:00
Firefox Fullscreen Kiosk
#!/usr/bin/env bash
# A proper implementation of web kiosk for Firefox-based browsers with more natural behavior (does not use --kiosk.)
# firefox-kiosk.sh: show fullscreen website in Firefox based browsers without --kiosk.
#
# F11 leave / re-enter fullscreen
# Ctrl+Q quit this window's browser
#
# ./open-site.sh # opens $url (default https://duckduckgo.com)
# ./open-site.sh https://example.com
# ./open-site.sh https://example.com
@Meterel
Meterel / AutoFlare.user.js
Last active November 27, 2026 02:49
A Tampermonkey userscript for Firefox that automatically clicks the Cloudflare Turnstile non interactive captcha by bypassing some of its security measures
// ==UserScript==
// @name AutoFlare
// @namespace https://gist.github.com/Meterel/1941f0c156f5f86aafdbddf5f19da42e
// @version 5
// @description A Tampermonkey userscript for Firefox that automatically clicks the Cloudflare Turnstile non interactive captcha by bypassing some of its security measures
// @author Meterel
// @updateURL https://gist.githubusercontent.com/Meterel/1941f0c156f5f86aafdbddf5f19da42e/raw/AutoFlare.user.js
// @downloadURL https://gist.githubusercontent.com/Meterel/1941f0c156f5f86aafdbddf5f19da42e/raw/AutoFlare.user.js
// @match https://challenges.cloudflare.com/cdn-cgi/challenge-platform/*/turnstile/*
// @run-at document-body